﻿<%@ Page Language="C#" MasterPageFile="~/adm_vlg/Admin_master.master" AutoEventWireup="true"
    CodeFile="category.aspx.cs" Inherits="adm_vlg_category" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>Quản trị Danh Mục</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="Server">
    <div id="toolbar">
        <div class="image">
            <img src="img/icon-48-category.png" /></div>
        <div class="text">
            QUẢN LÝ DANH MỤC</div>
        <div class="tool">
            <table>
                <tbody>
                    <tr>
                        <td>
                            <a href="categoryEdit.aspx?action=add"><span class="button icon-32-new"></span>Thêm
                                mới</a>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="clear">
        </div>
    </div>
    <br />
    <div class="List" style="overflow: auto">
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" AllowPaging="True"
            Width="100%" EmptyDataText="Không có công dữ liệu " AllowSorting="True" OnPageIndexChanging="GridView1_PageIndexChanging"
            PageSize="20" CssClass="adminlist">
            <Columns>
                <asp:TemplateField HeaderText="STT">
                    <ItemTemplate>
                        <%# Container.DataItemIndex + 1 %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Tên danh mục">
                    <ItemTemplate>
                        <%# Eval("TenCate") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <%-- <asp:TemplateField HeaderText="Tên tiếng anh">
                    <ItemTemplate>
                        <%# Eval("TenCate_E")%>
                    </ItemTemplate>
                </asp:TemplateField>--%>
                <asp:TemplateField HeaderText="Thứ tự">
                    <ItemTemplate>
                        <%# Eval("ThuTu") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <%--<asp:TemplateField HeaderText="Trạng thái">
                    <ItemTemplate>
                        <asp:CheckBox ToolTip='<%#Eval("idCategory") %>' ID="chkAnHien" runat="server" Checked='<%# Eval("AnHien") %>'
                            Text='<%# Eval("AnHien").ToString().Equals("True") ? " Hiện " : " Ẩn " %>' OnCheckedChanged="chkAnHien_OnCheckedChanged"
                            AutoPostBack="true" />
                    </ItemTemplate>
                </asp:TemplateField>--%>
                <asp:TemplateField HeaderText="Edit">
                    <ItemTemplate>
                        <a href="categoryEdit.aspx?action=edit&id=<%# Eval("idCategory")%>">Edit</a>
                        <%--<asp:LinkButton ID="linkEditG" runat="server" PostBackUrl='<%# Eval("idCategory","categoryEdit.aspx?action=edit&id={0}") %>'>Edit</asp:LinkButton>--%>
                        <%--<asp:LinkButton ID="linkDelG" runat="server" CommandArgument='<%# Eval("idCategory") %>'
                        OnClick="linkDelG_Click" OnClientClick='if (!confirm("Are you sure you want to delete ?")) return false;'>Delete</asp:LinkButton>--%>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    <%--<asp:FormView ID="FormView1" runat="server" AllowPaging="True" DataKeyNames="idCategory"
        DataSourceID="LinqDataSource1" Font-Size="12pt" Width="300px">
        <EditItemTemplate>
            idCategory:
            <asp:Label ID="idCategoryLabel1" runat="server" Text='<%# Eval("idCategory") %>' />
            <br />
            TenCate:
            <asp:TextBox ID="TenCateTextBox" runat="server" Text='<%# Bind("TenCate") %>' />
            <br />
            MoTa:
            <asp:TextBox ID="MoTaTextBox" runat="server" Text='<%# Bind("MoTa") %>' />
            <br />
            ThuTu:
            <asp:TextBox ID="ThuTuTextBox" runat="server" Text='<%# Bind("ThuTu") %>' />
            <br />
            AnHien:
            <asp:CheckBox ID="AnHienCheckBox" runat="server" Checked='<%# Bind("AnHien") %>' />
            <br />
            TenCate_E:
            <asp:TextBox ID="TenCate_ETextBox" runat="server" Text='<%# Bind("TenCate_E") %>' />
            <br />
            Tags:
            <asp:TextBox ID="TagsTextBox" runat="server" Text='<%# Bind("Tags") %>' />
            <br />
            Gigs:
            <asp:TextBox ID="GigsTextBox" runat="server" Text='<%# Bind("Gigs") %>' />
            <br />
            <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
                Text="Update" />
            &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False"
                CommandName="Cancel" Text="Cancel" />
        </EditItemTemplate>
        <InsertItemTemplate>
            TenCate:
            <asp:TextBox ID="TenCateTextBox" runat="server" Text='<%# Bind("TenCate") %>' />
            <br />
            MoTa:
            <asp:TextBox ID="MoTaTextBox" runat="server" Text='<%# Bind("MoTa") %>' />
            <br />
            ThuTu:
            <asp:TextBox ID="ThuTuTextBox" runat="server" Text='<%# Bind("ThuTu") %>' />
            <br />
            AnHien:
            <asp:CheckBox ID="AnHienCheckBox" runat="server" Checked='<%# Bind("AnHien") %>' />
            <br />
            TenCate_E:
            <asp:TextBox ID="TenCate_ETextBox" runat="server" Text='<%# Bind("TenCate_E") %>' />
            <br />
            Tags:
            <asp:TextBox ID="TagsTextBox" runat="server" Text='<%# Bind("Tags") %>' />
            <br />
            Gigs:
            <asp:TextBox ID="GigsTextBox" runat="server" Text='<%# Bind("Gigs") %>' />
            <br />
            <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
                Text="Insert" />
            &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False"
                CommandName="Cancel" Text="Cancel" />
        </InsertItemTemplate>
        <ItemTemplate>
            idCategory:
            <asp:Label ID="idCategoryLabel" runat="server" Text='<%# Eval("idCategory") %>' />
            <br />
            TenCate:
            <asp:Label ID="TenCateLabel" runat="server" Text='<%# Bind("TenCate") %>' />
            <br />
            MoTa:
            <asp:Label ID="MoTaLabel" runat="server" Text='<%# Bind("MoTa") %>' />
            <br />
            ThuTu:
            <asp:Label ID="ThuTuLabel" runat="server" Text='<%# Bind("ThuTu") %>' />
            <br />
            AnHien:
            <asp:CheckBox ID="AnHienCheckBox" runat="server" Checked='<%# Bind("AnHien") %>'
                Enabled="false" />
            <br />
            TenCate_E:
            <asp:Label ID="TenCate_ELabel" runat="server" Text='<%# Bind("TenCate_E") %>' />
            <br />
            Tags:
            <asp:Label ID="TagsLabel" runat="server" Text='<%# Bind("Tags") %>' />
            <br />
            Gigs:
            <asp:Label ID="GigsLabel" runat="server" Text='<%# Bind("Gigs") %>' />
            <br />
            <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit"
                Text="Edit" />
            &nbsp;<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete"
                Text="Delete" />
            &nbsp;<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New"
                Text="New" />
        </ItemTemplate>
        <PagerStyle BackColor="Blue" Font-Bold="True" Font-Italic="False" Font-Size="12pt"
            Font-Underline="True" ForeColor="White" />
    </asp:FormView>
    <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="VLGDataContext"
        EnableDelete="True" EnableInsert="True" EnableUpdate="True" TableName="Categories">
    </asp:LinqDataSource>--%>
</asp:Content>
